
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
            /* 通过设置 font-size 来改变图标大小 */
            width: 1em;
            height: 1em;
            /* 图标和文字相邻时，垂直对齐 */
            vertical-align: -0.15em;
            /* 通过设置 color 来改变 SVG 的颜色/fill */
            fill: currentColor;
            /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
               normalize.css 中也包含这行 */
            overflow: hidden;
        }

    </style>
</head>
<body>
<div class="main markdown">
    <h1>IconFont 图标</h1>
    <ul class="icon_lists clear">

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-caidan"></use>
            </svg>
            <div class="name">菜单</div>
            <div class="fontclass">#icon-caidan</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-gonggao"></use>
            </svg>
            <div class="name">公告</div>
            <div class="fontclass">#icon-gonggao</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-xiazai"></use>
            </svg>
            <div class="name">下载</div>
            <div class="fontclass">#icon-xiazai</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-zhuye"></use>
            </svg>
            <div class="name">主页</div>
            <div class="fontclass">#icon-zhuye</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-add2"></use>
            </svg>
            <div class="name">添加</div>
            <div class="fontclass">#icon-add2</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tongzhi1"></use>
            </svg>
            <div class="name">通知</div>
            <div class="fontclass">#icon-tongzhi1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-xiugai"></use>
            </svg>
            <div class="name">修改</div>
            <div class="fontclass">#icon-xiugai</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tongzhi"></use>
            </svg>
            <div class="name">通知</div>
            <div class="fontclass">#icon-tongzhi</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-iconfontroundcheck"></use>
            </svg>
            <div class="name">正确</div>
            <div class="fontclass">#icon-iconfontroundcheck</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-73"></use>
            </svg>
            <div class="name">保存</div>
            <div class="fontclass">#icon-73</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-llmenuwmnotice"></use>
            </svg>
            <div class="name">公告</div>
            <div class="fontclass">#icon-llmenuwmnotice</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-chaxun"></use>
            </svg>
            <div class="name">查询-</div>
            <div class="fontclass">#icon-chaxun</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-iconfontweibowukuang"></use>
            </svg>
            <div class="name">微博</div>
            <div class="fontclass">#icon-iconfontweibowukuang</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-qqkongjian"></use>
            </svg>
            <div class="name">qq空间</div>
            <div class="fontclass">#icon-qqkongjian</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tongzhi2"></use>
            </svg>
            <div class="name">通知</div>
            <div class="fontclass">#icon-tongzhi2</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-add"></use>
            </svg>
            <div class="name">添加</div>
            <div class="fontclass">#icon-add</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-weixin"></use>
            </svg>
            <div class="name">微信</div>
            <div class="fontclass">#icon-weixin</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-weixin1"></use>
            </svg>
            <div class="name">微信</div>
            <div class="fontclass">#icon-weixin1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tongzhi3"></use>
            </svg>
            <div class="name">通知</div>
            <div class="fontclass">#icon-tongzhi3</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shanchu"></use>
            </svg>
            <div class="name">删除</div>
            <div class="fontclass">#icon-shanchu</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-guanbi"></use>
            </svg>
            <div class="name">关闭</div>
            <div class="fontclass">#icon-guanbi</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-xiugai1"></use>
            </svg>
            <div class="name">修改</div>
            <div class="fontclass">#icon-xiugai1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-close"></use>
            </svg>
            <div class="name">关闭</div>
            <div class="fontclass">#icon-close</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-guanbi1"></use>
            </svg>
            <div class="name">关闭</div>
            <div class="fontclass">#icon-guanbi1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-guanbi2"></use>
            </svg>
            <div class="name">关闭</div>
            <div class="fontclass">#icon-guanbi2</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-zhengque"></use>
            </svg>
            <div class="name">正确</div>
            <div class="fontclass">#icon-zhengque</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-qq"></use>
            </svg>
            <div class="name">QQ</div>
            <div class="fontclass">#icon-qq</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-quanxian"></use>
            </svg>
            <div class="name">权限</div>
            <div class="fontclass">#icon-quanxian</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tiwen"></use>
            </svg>
            <div class="name">提问</div>
            <div class="fontclass">#icon-tiwen</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-zhengque1"></use>
            </svg>
            <div class="name">正确</div>
            <div class="fontclass">#icon-zhengque1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-iconfontgerenzhongxin"></use>
            </svg>
            <div class="name">个人中心</div>
            <div class="fontclass">#icon-iconfontgerenzhongxin</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-p-types"></use>
            </svg>
            <div class="name">类型</div>
            <div class="fontclass">#icon-p-types</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-icon04"></use>
            </svg>
            <div class="name">考试</div>
            <div class="fontclass">#icon-icon04</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-yonghuzu"></use>
            </svg>
            <div class="name">用户组</div>
            <div class="fontclass">#icon-yonghuzu</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-pingjia-copy"></use>
            </svg>
            <div class="name">评价</div>
            <div class="fontclass">#icon-pingjia-copy</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shitiguanli"></use>
            </svg>
            <div class="name">试题管理</div>
            <div class="fontclass">#icon-shitiguanli</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-system"></use>
            </svg>
            <div class="name">系统</div>
            <div class="fontclass">#icon-system</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-jiaose"></use>
            </svg>
            <div class="name">角色</div>
            <div class="fontclass">#icon-jiaose</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shaixuan"></use>
            </svg>
            <div class="name">筛选</div>
            <div class="fontclass">#icon-shaixuan</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-biji-copy"></use>
            </svg>
            <div class="name">笔记</div>
            <div class="fontclass">#icon-biji-copy</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-icon1460191801768"></use>
            </svg>
            <div class="name">权限</div>
            <div class="fontclass">#icon-icon1460191801768</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-lianxi"></use>
            </svg>
            <div class="name">练习</div>
            <div class="fontclass">#icon-lianxi</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-guanlijiaose"></use>
            </svg>
            <div class="name">管理角色</div>
            <div class="fontclass">#icon-guanlijiaose</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-huidano"></use>
            </svg>
            <div class="name">未回答</div>
            <div class="fontclass">#icon-huidano</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shouye-copy-copy-copy"></use>
            </svg>
            <div class="name">首页-首页</div>
            <div class="fontclass">#icon-shouye-copy-copy-copy</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shouyeshouye"></use>
            </svg>
            <div class="name">首页_首页</div>
            <div class="fontclass">#icon-shouyeshouye</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tianjiayonghu"></use>
            </svg>
            <div class="name">添加用户</div>
            <div class="fontclass">#icon-tianjiayonghu</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-tiku"></use>
            </svg>
            <div class="name">题库</div>
            <div class="fontclass">#icon-tiku</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-weibo"></use>
            </svg>
            <div class="name">微博</div>
            <div class="fontclass">#icon-weibo</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-lianxi1"></use>
            </svg>
            <div class="name">联系</div>
            <div class="fontclass">#icon-lianxi1</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-shiti"></use>
            </svg>
            <div class="name">试题</div>
            <div class="fontclass">#icon-shiti</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-sousuo_sousuo"></use>
            </svg>
            <div class="name">搜索_搜索</div>
            <div class="fontclass">#icon-sousuo_sousuo</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-search"></use>
            </svg>
            <div class="name">搜索_搜索</div>
            <div class="fontclass">#icon-search</div>
        </li>

        <li>
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-leixing"></use>
            </svg>
            <div class="name">类型</div>
            <div class="fontclass">#icon-leixing</div>
        </li>

    </ul>


    <h2 id="symbol-">symbol引用</h2>
    <hr>

    <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
    <ul>
        <li>支持多色图标了，不再受单色限制。</li>
        <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
        <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
        <li>浏览器渲染svg的性能一般，还不如png。</li>
    </ul>
    <p>使用步骤如下：</p>
    <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
    <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
    <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
    <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
    <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
    <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span
            class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span
            class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span
            class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span
            class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
</div>
</body>
</html>
